package Stack;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Stack;

/**
 * @Author wangzhipeng
 * @Date 2020-08-11 11:54 上午
 * @Description
 */
public class TestStack {
    public static void main(String[] args) {
        Stack<Integer> stack = new Stack<>();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        stack.push(4);
        while(!stack.empty()){
            int i = stack.peek();
            System.out.println("栈顶元素"+i+" 正在出栈...");
            stack.pop();
        }


    }

}
